1. Field of the Invention
The present invention relates to an image coding apparatus and image coding method and, more particularly, to a technique suitable for use in a coding apparatus arranged to change a size of a block as a coding unit.
2. Description of the Related Art
Recently, as digitization of information associated with so-called multimedia including audio signal and image signal has made rapid progress, compression coding/decoding techniques for the image signal are receiving attention. The compression coding/decoding techniques can reduce the storage capacity necessary to store image signals and the band necessary for transmission, and thus are very important techniques in the multimedia industry.
These compression coding/decoding techniques compress the information amount/data amount by using the degree of autocorrelation (that is, redundancy) which many image signals have therein. The redundancy of an image signal includes temporal redundancy and two-dimensional spatial redundancy. The temporal redundancy can be reduced using motion detection and motion compensation for each block. In contrast, the spatial redundancy can be reduced using discrete cosine transform (DCT). One coding method using these techniques is H.264/MPEG-4 PART10 (AVC) (to be referred to as H.264 hereinafter).
When implementing the H.264 coding process by hardware, the coding process is generally divided into a prediction coding method determination process, prediction coding process, and entropy coding process, and the respective processes are pipelined on the coding block unit basis (Japanese Patent Application Laid-Open No. 2010-50833). It is also common practice to arrange a mechanism which feeds back a code amount after entropy coding on the coding block basis and controls a quantization coefficient on the coding block basis so that the code amount after entropy coding falls within a predetermined code amount.
The control of the quantization coefficient is included in the prediction coding process among the above-mentioned pipeline processes. The pipeline processes generate a delay of two macroblocks until feedback of a code amount is reflected in the quantization coefficient. FIG. 5A is a view schematically showing the above-mentioned pipeline processes. In FIG. 5A, MB represents a coding block, and feedback of the generated code amount of MB0 is reflected in MB2.
In recent years, next-generation coding methods are being studied. One of the techniques under consideration is a changeable coding block size. This technique increases the coding efficiency by changing the size of a coding block serving as a coding unit in accordance with features of an image.
FIG. 4 shows an example in which a part of an image frame is divided into coding blocks of a plurality of sizes. In FIG. 4, (CU) represents a coding block. Here, a part of an image frame is divided into 10 coding blocks CU0 to CU9.
However, when the size of a coding block is changeable, if the quantization coefficient is determined by feeding back the generated code amount of a coding block similarly to the conventional coding method, the delay until feedback of a code amount is reflected in the quantization coefficient may increase. For example, when CU sizes are those as shown in FIG. 4, feedback of the generated code amount of CU0 is reflected in CU8, as shown in FIG. 5B.